package com.atguigu.yygh.hosp.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author:ahang
 * @create:2022-08-21 0:14
 * @Description:配置类
 */
@ComponentScan(basePackages = "com.atguigu")  //指定要扫描的包路径
@SpringBootConfiguration
@EnableTransactionManagement  //开启事务
@MapperScan(basePackages = "com.atguigu.yygh.hosp.mapper")
@EnableFeignClients(basePackages = "com.atguigu")  //feign所在的基础包
public class HospConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
